#ifndef KD_TREE_HPP
#define KD_TREE_HPP
#include "photon.hpp"
#include "vector.hpp"
#include <list>

using namespace std;

struct Kd_Node {
	Kd_Node(const double,unsigned short);
	
	void add_left(Kd_Node*);
	void add_right(Kd_Node*);
	void add_photon(Photon*);

	void pre_order(void);
	
	Kd_Node* left;
	Kd_Node* right;
	double data;  /* X,Y or Z */
	unsigned short dimension;
	Photon* photon;
};

struct Kd_Tree {
	Kd_Tree(void);
	
	Kd_Node* root;
};

#endif
